import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'

import HmFind from '../views/HmFind.vue'
import HmMy from '../views/HmMy.vue'
import HmFriend from '../views/HmFriend.vue'

// 创建路由全局
const router = createRouter({
  // 配置路由模式 #/xx/xx
  history: createWebHashHistory(),
  //路由模式/xx/xx
  // history: createWebHistory(import.meta.env.BASE_URL),
  // 路由规则模式
  routes: [
    {
      path: '/find',
      name: 'find',
      component: HmFind
    },
    {
      path: '/my',
      name: 'my',
      component: HmMy
    },
     {
      path: '/friend',
      name: 'friend',
      component: HmFriend
    }
  ]
})

export default router
